package com.by.controller;

import cn.hutool.core.bean.BeanUtil;
import com.by.bean.SupplierInquiry;
import com.by.bean.SupplierQuotation;
import com.by.common.bean.PageBean;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.SupplierQuotationService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public class SupplierQuotationController extends BaseController {

    @Autowired
    SupplierQuotationService supplierQuotationService;

    @PostMapping("/supplierQuotation/list")
    @ApiOperation("供应商报价列表")
    public ResultBean<PageBean<List<SupplierQuotation>>> query(@RequestBody SupplierQuotation supplierQuotation) {
        PageBean bean = supplierQuotationService.queryByMap(BeanUtil.beanToMap(supplierQuotation));
        return success("查询成功", bean);
    }

}
